/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.proyectgroupd;
import GrupoD_Final.ImpGenericMessage;
import org.jivesoftware.smack.packet.Message;

/**
 *
 * @author maiKDonald
 */
public class MessageConverter {
    ImpGenericMessage unconverted;
    Message convert;
    public MessageConverter(ImpGenericMessage unconverted){
        this.unconverted=unconverted;
    }
    public Message MessageConversion (ImpGenericMessage unconverted){
 //       convert.setBody(unconverted.getContent());
        convert.setFrom(unconverted.getSource());
        convert.setTo(unconverted.getDestination()+unconverted.getResource());
        convert.setProperty(unconverted.getMessageType(), unconverted);
        
       
        return convert;
    }
}
